import { rcaNumberFormat0, rcaNumberFormat00 } from './common.js'
import { dateFormat } from '@/util/date'
import { commonTableOption } from './common.js'
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01';
export const endDate = dateFormat(new Date(), 'yyyy-MM-dd');
export const tableOption = {
  ...commonTableOption,
  height: '400px',
  column: [
    {
      hide: true,
      search: true,
      type: 'date',
      label: '日期范围',
      prop: 'tradeDate',
      searchSpan: 12,
      searchRange: true,
      searchValue: [],
      format: 'yyyy-MM-dd',                  // 这是组件展示的日期格式
      valueFormat: 'yyyy-MM-dd',
    },
    /*{
      search: false,
      type: 'select',
      label: '运营商',
      props: {
        label: 'operatorsName',
        value: 'operators'
      },
      dicUrl: '/rca/swckclearrules/listoperators',
      prop: 'operators'
    },*/
	 {
      search: false,
      type: 'input',
      label: '运营商',
      prop: 'operatorsName'      
    },
    {
      label: '长安通消费出闸金额',
      children: [
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '长安通',
          prop: 'catSystemClean'
        },
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '交通一卡通',
          prop: 'trafficCardSystemClean'
        },
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '小计',
          prop: 'catPaySubtotal'
        },
      ]
    },
    {
      label: '长安通划账金额',
      children: [
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '长安通',
          prop: 'remitCat'
        }, {
          type: 'input',
          showSummary: true,
          precision: 7,
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '交通一卡通',
          prop: 'remitTrafficCard'
        }, {
          type: 'input',
          showSummary: true,
          precision: 7,
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '小计',
          prop: 'catRemitSubtotal'
        }
      ]
    }]
}
